
from openai import OpenAI

# Initialize the OpenAI client
client = OpenAI(api_key="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")

# Read the prompt from the text file
with open('prompt_content.txt', 'r', encoding='utf-8') as file:
    prompt_content = file.read()

# Create a chat completion
completion = client.chat.completions.create(
    model="gpt-4o-mini",
    messages=[
        {"role": "system", "content": "给你一个场景的任务"},
        {"role": "user", "content": prompt_content}
    ]
)

# Print the response from the model
print(completion.choices[0].message.content)
